﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AntSimulationGui
{
    public class DataContainer : INotifyPropertyChanged
    {
        #region Variables
        private int m_Rows = 10;
        private int m_Columns = 10;
        private int m_countOfAnts = 10;
        private int m_CountOfFood = 100;
        private int m_CountOfHives = 1;
        private int m_AntsCount = 0;
        private int m_FoodCount = 0;
        private bool m_MessageBox = false;
        private bool m_ParameterButtonEnabled = true;




        #endregion

        #region Properties
        public bool ParameterButtonEnabled
        {
            get { return m_ParameterButtonEnabled; }
            set
            {
                m_ParameterButtonEnabled = value;
                OnPropertyChanged("ParameterButtonEnabled");
            }
        }
        public bool MessageBox
        {
            get { return m_MessageBox; }
            set { m_MessageBox = value; }
        }
        public int FoodCount
        {
            get { return m_FoodCount; }
            set
            {
                m_FoodCount = value;
                OnPropertyChanged("FoodCount");
            }
        }

        public int AntsCount
        {
            get { return m_AntsCount; }
            set
            {
                m_AntsCount = value;
                OnPropertyChanged("AntsCount");
            }
        }
        public int CountOfHives
        {
            get { return m_CountOfHives; }
            set { m_CountOfHives = value; }
        }

        public int CountOfFood
        {
            get { return m_CountOfFood; }
            set { m_CountOfFood = value; }
        }

        public int CountOfAnts
        {
            get { return m_countOfAnts; }
            set { m_countOfAnts = value; }
        }


        public int Columns
        {
            get { return m_Columns; }
            set { m_Columns = value; }
        }


        public int Rows
        {
            get { return m_Rows; }
            set { m_Rows = value; }
        }
        #endregion

        public event PropertyChangedEventHandler PropertyChanged;

        private void OnPropertyChanged(string name)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(name));
        }
    }
}
